#ifndef PLUGINSPEC_H
#define PLUGINSPEC_H

#include "pluginextension_global.h"
#include "iplugin.h"

class IPlugin;

class PLUGINEXTENSIONSHARED_EXPORT PluginSpec: public QObject
{
public:
    PluginSpec();

    enum SpecState{ Invalid, Readed, Loaded, Initialized, Running, Deleted}state;

    QString name;
    QString version;
    QString filePath;
    qint64 size;

    void ReadInfo(QFileInfo file);
    bool LoadLibrary();
    bool InitializePlugin();
    bool InitializeExtensions();
    void DeleteLibrary();

    IPlugin *plugin;

private:

};

#endif // PLUGINSPEC_H
